import request from '@/utils/request'

// 注册
export function register(data) {
  return request({
    url: "/api/auth/register",
    method: "post",
    data,
  });
}
//登录
export function login(data) {
  return request({
    url: "/api/auth/login",
    method: "post",
    data,
  });
}
// 获取用户信息
export function getInfo(token) {
  return request({
    url: "/api/user/info",
    method: "get",
    params: { token },
  });
}

// 登出
export function logout() {
  return request({
    url: "/api/auth/logout",
    method: "post",
  });
}
